/* 基本 navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  font-size: 0.95rem;
  white-space: nowrap;
  background-color: #000 !important;
}

/* LOGO */
.navbar-brand {
  font-family: 'Noto Sans TC', sans-serif !important;
  font-size: 28px !important;
  font-weight: 600 !important;
  letter-spacing: 0.5em !important;
  margin-left: 20px !important;
  display: flex;
  align-items: center;
  white-space: nowrap; /* 防止換行 */
  flex-shrink: 0; /* 不縮小 */
}

/* LOGO 圖片 */
.navbar-brand img {
  height: 40px;
  margin-right: 20px;
  flex-shrink: 0;
}

/* 導覽內容容器 */
#templatemo_main_nav > div.container.d-flex.align-items-center.flex-nowrap.justify-content-between {
  width: 100%;
  overflow: visible !important;
  min-height: 64px; /* 固定橫幅高度 */
}

/* 導覽內容第二層容器 */
#templatemo_main_nav > div.container > div.d-flex.flex-column.flex-lg-row.align-items-lg-center.gap-4.ms-auto.text-end {
  flex-direction: row !important; /* 在大螢幕是排成一排 */
  flex-wrap: nowrap !important;
  justify-content: flex-end;
  align-items: center;
  gap: 1.5rem;
}

/* 導覽選單 */
#templatemo_main_nav ul.navbar-nav {
  flex-direction: row !important;
  gap: 1.5rem;
  padding-left: 0px;
  margin-bottom: 0;
  white-space: nowrap;
  list-style: none;
  margin-right: 4rem; /* 導覽選單和社群按鈕間距 */
}

/* 下拉選單的父元素要相對定位 */
.navbar-nav li.nav-item.dropdown {
  position: relative;
}

/* 下拉選單容器，初始隱藏 */
.navbar-nav ul.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #000;
  padding: 0.5rem 0;
  margin: 0;
  list-style: none;
  min-width: 160px;
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
  z-index: 10000;
  /* 移除 opacity 與 visibility */
}

.navbar-nav li.nav-item.dropdown:hover > ul.dropdown-menu {
  display: block;
}


/* 下拉選單裡的連結樣式 */
.navbar-nav ul.dropdown-menu li a.dropdown-item {
  display: block;
  padding: 0.5rem 1.5rem;
  color: rgb(255, 255, 255);
  text-decoration: none;
  white-space: nowrap;
}

/* 下拉選單連結 hover */
.navbar-nav ul.dropdown-menu li a.dropdown-item:hover {
  background-color: rgb(216, 48, 140);
  color: white;
}

/* nav-link 顏色與 hover */
.navbar-nav .nav-link {
  color: white;
  text-decoration: none;
  white-space: nowrap;
}

.navbar-nav .nav-link:hover {
  color: rgb(216, 48, 140) !important;
}

/* 社群按鈕容器 */
#templatemo_main_nav .d-flex.gap-3.justify-content-end {
  justify-content: flex-end;
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 2rem;
}

/* 社群按鈕圖示 */
#templatemo_main_nav .d-flex.gap-3.justify-content-end a i {
  color: white;
  transition: color 0.3s ease;
  font-size: 1.5rem;
}

#templatemo_main_nav .d-flex.gap-3.justify-content-end a:hover i {
  color: rgb(216, 48, 140) !important;
}

/* 語言切換按鈕容器 */
#language-switcher {
  font-weight: 600;
  user-select: none;
  color: white;
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 語言按鈕 */
#language-switcher .lang-btn {
  color: white;
  cursor: pointer;
  transition: color 0.3s ease;
  text-decoration: none;
  padding: 0;
  margin: 0 0.3rem;
  white-space: nowrap;
  background: none;
  border: none;
}

/* 語言按鈕 hover */
#language-switcher .lang-btn:hover {
  color: rgb(216, 48, 140) !important;
}

/* 選中語言 */
#language-switcher .active-lang {
  color: rgb(216, 48, 140);
  cursor: default;
  text-decoration: none;
}

/* container 調整 */
.container.d-flex.align-items-center {
  max-width: 100% !important;
  padding-left: 1rem;
  padding-right: 1rem;
  position: relative;
  display: flex;
  align-items: center;
}

/* 移除 margin-left 過大 */
.button-margin-left {
  margin-left: 0 !important;
  max-width: none;
}

/* 手機板特化 */
/* 最大寬度 991.98px以下 */
@media (max-width: 991.98px) {
  .navbar-brand {
   font-size: 30px !important;
   letter-spacing: 0.3em !important;
   text-align: left;
 }
  /* 導覽容器保持一排不換行 */
  #templatemo_main_nav > div.container > div.d-flex.flex-column.flex-lg-row.align-items-lg-center.gap-4.ms-auto.text-end {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
  }

  /* 導覽選單隱藏 */
  #templatemo_main_nav ul.navbar-nav {
    display: none !important;
  }

  /* 社群按鈕隱藏 */
  #templatemo_main_nav .d-flex.gap-3.justify-content-end {
    display: none !important;
  }

  /* 語言切換按鈕隱藏 */
  #language-switcher {
    display: none !important;
  }
}

  /*標題區*/
  .text-section {
    height: 400px;
    background:
      radial-gradient(circle at 20% 30%, rgb(255, 56, 255) 0%, transparent 100%),
      radial-gradient(circle at 80% 20%, rgb(255, 153, 0) 0%, transparent 100%),
      radial-gradient(circle at 50% 75%, rgb(57, 149, 255) 0%, transparent 100%);
    background-blend-mode: screen;
    background-color: #ff0077;   /* 底色，你可以改 */
    padding: 40px 20px;           /* 控制上下左右區塊間距 */
    text-align: center;           /* 文字置中 */
    font-family: "微軟正黑體", Arial, sans-serif; /* 可自訂字體 */
    color: rgb(255, 255, 255);
    margin-top: 110px;
    margin-bottom: -240px;

    /* 底部漸層透明遮罩 */
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
  }

  .section-title {
    font-size: 2rem;          /* 標題字體大小 */
    line-height: 1.3;         /* 標題行高 */
    margin: 40px 0 16px 0;    /* 標題底部間隔，控制標題與內文間距 */
    font-weight: 700;         /* 粗體 */
  }

  .section-content {
    font-size: 1.1rem;        /* 內文字體大小 */
    line-height: 1.6;         /* 內文行高 */
    margin: 0;                /* 內文外邊距清零 */
    max-width: 600px;         /* 可限制內文寬度 */
    margin-left: auto;
    margin-right: auto;       /* 讓內文寬度置中 */
  }
/*標題區結束*/

/*圖片區*/
:root {
  --gap: 16px;            /* 圖片之間的間距 */
  --side-padding: 120px;   /* 與頁面左右邊的距離 */
}

body {
  margin: 0;
  font-family: sans-serif;
}

.image-section {
  margin-top: 120px;
  padding: 20px var(--side-padding);
  margin-bottom: 120px;
}

.image-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
  justify-content: flex-start;
}

.image-item {
  position: relative;
  flex: 1 1 calc((100% - 3 * var(--gap)) / 3);
  aspect-ratio: 16 / 9;
  cursor: pointer;
  overflow: hidden;
  border-radius: 8px;
}

.image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.image-item:hover img {
  transform: scale(1.05);
}

/* 放大檢視 */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center; /* 水平置中 */
  align-items: center;     /* 垂直置中 */
  padding: 20px;           /* 保險起見留點邊距 */
  box-sizing: border-box;
}

.modal img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  object-fit: contain;
  margin-right: 0px;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 32px;
  color: white;
  cursor: pointer;
}

/* 手機板：螢幕寬度小於等於 768px 時 */
@media (max-width: 768px) {
  .image-item {
    flex: 1 1 100%;
  }
  .modal img{
      margin-right: 15px;
  }
    :root {
    --side-padding: 10px;  /* 手機板左右邊距 */
  }
}
/*圖片區結束*/

/*底部*/
#custom_footer {
    padding-top: 0px;
    padding-bottom: 60px;
    background-color: #111827;
    color: #dcdde1;
}

#custom_footer .container {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 1140px;
    margin: 0 auto;
}

#custom_footer h5 {
    margin-bottom: 20px;
    color: white;
    font-weight: 500;
}

#custom_footer ul.custom-footer-link-list li {
    padding-top: 10px;
}

#custom_footer a {
    color: #dcdde1;
    text-decoration: none;
}

#custom_footer a:hover {
    color: rgb(216, 48, 140);
}

#custom_footer .copyright-area {
    display: flex;
    justify-content: center; /* 水平置中 */
    align-items: center;     /* 垂直置中 */
    height: 50px;            /* 高度可自行調整 */
    margin-top: 10px;
}

#custom_footer .border-light {
    border-color: #ffffff !important;
}

#custom_footer .bg-black {
    background-color: #474747 !important;
}

#custom_footer .pt-5 {
    padding-top: 3rem;
}

#custom_footer ul.footer-icons li {
    margin-right: 10px;
}

#custom_footer .col-md-4 {
    padding-bottom: 2rem;
}

#custom_footer p,
#custom_footer li,
#custom_footer a {
    font-size: 16px;
    line-height: 1.6;
}
